using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;

namespace NDomain.ExampleModels.BloggingSystem.Infrastructure
{
    public class SessionOpener
    {
        private ISessionFactory _sessionFactory;
        private IInterceptor _interceptor;

        public SessionOpener(ISessionFactory sessionFactory, IInterceptor interceptor)
        {
            _sessionFactory = sessionFactory;
            _interceptor = interceptor;
        }
        public ISession OpenSession()
        {
            return _sessionFactory.OpenSession(_interceptor);
        }
    }
}
